home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_objc.idb / usr / freeware / include / cakit / ccltn.h.z / ccltn.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1023 b   |  65 lines

  1.  
  2. /*
  3.  * Computer Algebra Kit (c) 1994,98 by Comp.Alg.Objects.  All Rights Reserved.
  4.  * $Id: ccltn.h,v 1.1.1.1 1999/03/22 21:48:43 stes Exp $
  5.  */
  6.  
  7. #ifndef __CACOLLECTION_HEADER__
  8. #define __CACOLLECTION_HEADER__
  9.  
  10. #include "cobject.h"
  11.  
  12. typedef id *mmbs_t;
  13.  
  14. typedef struct cltn {
  15.   int count;
  16.   int capacity;
  17.   mmbs_t members;
  18. } *cltn_t;
  19.  
  20. @interface CACollection : CAObject
  21. {
  22.   struct cltn value;
  23. }
  24.  
  25. + new;
  26. + new:(unsigned)aCapacity;
  27. - empty;
  28. - copy;
  29. - deepCopy;
  30. - clear;
  31.  
  32. - (BOOL) isEqual:aCollection;
  33. - (unsigned) hash;
  34. - (BOOL) isEmpty;
  35. - (BOOL) notEmpty;
  36. - (unsigned) size;
  37.  
  38. - add:anObject;
  39. - addIfAbsent:anObject;
  40. - at:(unsigned)i insert:anObject;
  41.  
  42. - removeLast;
  43. - removeAt:(int)i;
  44. - remove:anObject;
  45.  
  46. - at:(unsigned)i put:anObject;
  47. - swapElementsAt:(int)i:(int)j;
  48.  
  49. - eachElement;
  50. - eachElementReversed;
  51. - at:(unsigned)i;
  52. - (float) floatValueAt:(int)i;
  53. - (int) intValueAt:(int)i;
  54. - lastElement;
  55. - (int) offsetOf:anObject;
  56.  
  57. - merge:aCltn;
  58. - union:aCltn;
  59.  
  60. - printOn:(IOD)aFile;
  61. @end
  62.  
  63. #endif                /* __CACOLLECTION_HEADER__ */
  64.  
  65.